
import java.util.ArrayList

object MemoryTraceInvistigator 
{ 
  def main(args: Array[String]) = {
  
    if(args.length!=2){
      println("Usage: scala MemoryTraceInvistigator [memoryTraceProfile.txt] [backtraces.txt] ")
      exit()
    }
    
    var userInterface:ConsoleUserInterface=null
    
    try
    {
    /*Instance du parseur*/  
    userInterface= new ConsoleUserInterface(args(1),args(0))
    
    
    /*charge en mémoire le traces et les backtraces*/
    userInterface.parseFiles()
    
    }
    catch{
      case e:java.io.FileNotFoundException => println(memorytrace.constantes.Constantes.MSG_FILE_NOT_FOUND)
    		  								  exit()
      case e:scala.MatchError => println("Verifiez la validité grammaticale des fichiers")
      							 exit()
    }
    /*lance la boucle d'interaction*/
    userInterface.readCommande()
   } 
  
}